package com.wulis.provider.basic.service;

import java.util.List;

import com.wulis.common.support.BaseService;
import com.wulis.provider.basic.model.dto.InsertDepartmentDto;
import com.wulis.provider.basic.model.dto.QueryDepartmentTreeDto;
import com.wulis.provider.basic.model.dto.UpdateDepartmentDto;
import com.wulis.provider.basic.model.entity.Department;
import com.wulis.provider.basic.model.vo.InsertDepartmentVo;
import com.wulis.provider.basic.model.vo.QueryDepartmentTreeVo;
import com.wulis.provider.basic.model.vo.QueryDepartmentVo;

import lombok.NonNull;

/**
 * 基础信息管理：部门信息表 Service
 *
 * @author WuliBao
 * @date 2020-05-21
 */
public interface DepartmentService extends BaseService<Department> {
    
    /**
     * WEB:查询部门信息列表(树形)
     * 
     * @param queryDepartmentTreeDto queryDepartmentTreeDto
     * @return List
     */
    List<QueryDepartmentTreeVo> queryDepartmentTree(@NonNull QueryDepartmentTreeDto queryDepartmentTreeDto);
    
    /**
     * WEB:查询部门信息
     * 
     * @param id id
     * @return QueryDepartmentVo
     */
    QueryDepartmentVo queryDepartment(@NonNull Long id);
    
    /**
     * WEB:新增部门信息
     * 
     * @param insertDepartmentDto insertDepartmentDto
     * @return InsertDepartmentVo
     */
    InsertDepartmentVo insertDepartment(@NonNull InsertDepartmentDto insertDepartmentDto);
    
    /**
     * WEB:修改部门信息
     * 
     * @param updateDepartmentDto updateDepartmentDto
     * @return Integer
     */
    Integer updateDepartment(@NonNull UpdateDepartmentDto updateDepartmentDto);
    
    /**
     * WEB:删除部门信息
     * 
     * @param id id
     * @return Integer
     */
    Integer deleteDepartment(@NonNull Long id);
    
    /**
     * WEB:删除部门信息(根据组织机构ID)
     *
     * @param organizationId organizationId
     * @return Integer
     */
    Integer deleteDepartmentByOrganizationId(@NonNull Long organizationId);
}
